hvm svm: Initialise VMCB CR4 and shadow CR4 with 0 when VMCB is being
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 27 Mar 2007 17:53:05 +0000 (18:53 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Tue, 27 Mar 2007 17:53:05 +0000 (18:53 +0100)
constructed under nested paging mode. It complies with recent
reset_to_realmode change in hvmloader.
Signed-off-by: Wei Huang <wei.huang2@amd.com>
xen/arch/x86/hvm/svm/vmcb.c

index 446ddbb9680be96b5c4abcd5a3c8ce419eed7f37..db84bcd8b1e6f1cb3bc749e8151685efe4fb28d7 100644 (file)
@@ -203,6 +203,7 @@ static int construct_vmcb(struct vcpu *v)
         vmcb->g_pat = 0x0007040600070406ULL; /* guest PAT */
         vmcb->exception_intercepts &= ~EXCEPTION_BITMAP_PG;
         vmcb->h_cr3 = pagetable_get_paddr(v->domain->arch.phys_table);
+        vmcb->cr4 = arch_svm->cpu_shadow_cr4 = 0;
     }
 
     return 0;